import request from '@/utils/request'
// 新增 类别
export function AddTypeDataAPI(data) {
  return request({
    url: '/system/awmateria/addType',
    method: 'POST',
    data
  })
}

// 修改类别
export function EditTypeDataAPI(data) {
  return request({
    url: '/system/awmateria/editType',
    method: 'PUT',
    data
  })
}
// 删除类别
export function DelTypeDataAPI(params) {
  return request({
    url: '/system/awmateria/removeType',
    method: 'DELETE',
    params
  })
}

// 新增   实体
export function AddDataAPI(data) {
  return request({
    url: '/system/awmateria',
    method: 'POST',
    data
  })
}

// 修改  实体
export function EditDataAPI(data) {
  return request({
    url: '/system/awmateria/edit',
    method: 'PUT',
    data
  })
}

// 删除  实体
export function DelDataAPI(query) {
  return request({
    url: '/system/awmateria/' + query,
    method: 'DELETE'
  })
}

// 详情  实体
export function GetDelDataAPI(query) {
  return request({
    url: '/system/awmateria/' + query,
    method: 'get'
  })
}

// 列表  实体
export function GetListAPI(query) {
  return request({
    url: '/system/awmateria/list',
    method: 'get',
    params: query
  })
}

//  封存
export function EditFreezAPI(query) {
  return request({
    url: '/system/awmateria/editFreeze',
    method: 'put',
    data: query
  })
}

//  解冻
export function editThawAPI(query) {
  return request({
    url: '/system/awmateria/editThaw',
    method: 'put',
    data: query
  })
}

//  树结构
export function GetTreeAPI(query) {
  return request({
    url: '/system/awmateria/listChildren',
    method: 'get',
    params: query
  })
}

// 树结构详情
export function GetTreeSelAPI(query) {
  return request({
    url: '/system/awmateria/listCoding',
    method: 'get',
    params: query
  })
}

// 编码规则下拉
export function GetSelectAPI(query) {
  return request({
    url: '/system/ofcode/listThe',
    method: 'get',
    params: query
  })
}
